package com.fowo.api.syncAmazon.mapper;

import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface AmazonTmpMapper {
    /**
     * 清空赔偿临时表
     * @return
     */
    int deleteAllReimbursements();

    /**
     * 清空盘存临时表
     * @return
     */
    int deleteAllStockTaking();

    /**
     * 清空月仓储费临时表
     * @return
     */
    int deleteAllStorageFeeMonth();

    /**
     * 清空长期仓储费临时表
     * @return
     */
    int deleteAllStorageFeeLongTerm();

    /**
     * 清空FBA退货订单临时表
     * @return
     */
    int deleteAllFBARefundOrder();

    /**
     * 清空FBM退货订单临时表
     * @return
     */
    int deleteAllFBMRefundOrder();

    /**
     * 清空移除订单临时表
     * @return
     */
    int deleteAllRemovalOrder();

    /**
     * 清空换货订单临时表
     * @return
     */
    int deleteAllExchangeOrder();

    /**
     * 清空移除货件临时表
     * @return
     */
    int deleteAllShipmentRemovalOrder();

    /**
     * 清空销售统计临时表
     * @return
     */
    int deleteAllSalesStatement();

    /**
     * 清空FBA库存临时表
     * @return
     */
    int deleteFbaInventory();

    /**
     * 插入FBA库存数据
     * @return
     */
    int insertFbaInventory();

    /**
     * 更新FBA库存数据
     * @return
     */
    int updateFbaInventory();

    /**
     * 更新FBA库龄数据
     * @return
     */
    int updateFbaInventoryAge();

    /**
     * 更新FBA预留库存数据
     * @return
     */
    int updateFbaInventoryReserved();

    /**
     * 清空SKU业务报表临时表
     * @return
     */
    int deleteTmpBusinessReportsBySku();
    int insertTmpBusinessReportsBySku();
    int updateTmpBusinessReportsBySku();

    /**
     * 清空子产品业务报表临时表
     * @return
     */
    int deleteTmpBusinessReportsByChild();
    int insertTmpBusinessReportsByChild();
    int updateTmpBusinessReportsByChild();

    /**
     * 清空父产品业务报表临临时表
     * @return
     */
    int deleteTmpBusinessReportsByParent();
    int insertTmpBusinessReportsByParent();
    int updateTmpBusinessReportsByParent();

    /**
     * 清空结算临时表
     * @return
     */
    int deleteSettlementReport();

    /**
     * 插入结算数据
     * @return
     */
    int insertSettlementReport();

    /**
     * 更新结算报表数据
     * @return
     */
    int updateSettlementReport();

    /**
     * 更新结算状态
     * @return
     */
    int updateSettlementStatue();

    int deleteTmpFbaShipment();

    int deleteTmpFbaShipmentProduct();

    /**
     * 销售统计-删除listing重新插入
     * @param ids
     */
    void deleteSalesStatementByAOId(List<String> ids);

    void salesStatementBySellOrder(List<String> amazonOrderIds);


    void deleteTmpAdvertiserInvoices();
    void deleteTmpAdvertiserInvoicesCampaign();

    void insertAmazonAdvertiserInvoices();
    void updateAmazonAdvertiserInvoices();

    void insertAmazonAdvertiserInvoicesCampaign();

    /**
     * 删除结算汇总临时表
     * @return
     */
    int deleteTmpFinancialEventGroup();

    /**
     * 插入结算汇总
     * @return
     */
    int insertAmazonFinancialEventGroup();

    /**
     * 更新结算汇总
     * @return
     */
    int updateAmazonFinancialEventGroup();
}
